In the XEN_SYSCTL_CPUPOOL_OP_MOVEDOMAIN operation, the existing check
for domid == 0 should be checking that a domain does not attempt to
modify its own cpupool; fix this by using rcu_lock_remote_domain_by_id.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
{
struct domain *d;
- ret = -EINVAL;
- if ( op->domid == 0 )
- break;
- ret = -ESRCH;
- d = rcu_lock_domain_by_id(op->domid);
- if ( d == NULL )
+ ret = rcu_lock_remote_domain_by_id(op->domid, &d);
+ if ( ret )
break;
if ( d->cpupool == NULL )
{